/*
This algorithm can be found in page 77.
O(n^lg7)
*/

#include<iostream>
using namespace std;

